// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// This was machine generated with:
// bash$ fidlc --c-header trace_provider.fidl.h --tables trace_provider.fidl.cpp
//   --files system/fidl/tracelink/tracelink.fidl
// There are *no* differences with the machine generated version except the
// addition of this text at the top (up to "End of additions ...").
// This is important to lessen the maintenance burden until we no longer
// check in machine generated code.
// It is checked in to workaround these problems:
// - zircon's build system doesn't support transitive dependencies
// - duplicate copy of tracelink is generated and compiled in garnet,
//   leading to duplicate symbol linker errors
// - generated code for Interfaces is different than what we're using:
//   struct vs zx_handle_t

#define fuchsia_tracelink_ProviderStartRequestTable ProviderStartRequestTable
#define fuchsia_tracelink_ProviderStopRequestTable ProviderStopRequestTable
#define fuchsia_tracelink_RegistryRegisterTraceProviderRequestTable RegistryRegisterTraceProviderRequestTable

#include <zircon/types.h>
using fuchsia_tracelink_Provider = zx_handle_t;

// End of additions to machine-generated file.
// WARNING: This file is machine generated by fidlc.

#pragma once

#include <stdalign.h>
#include <stdbool.h>
#include <stdint.h>
#include <zircon/fidl.h>
#include <zircon/syscalls/object.h>
#include <zircon/types.h>

#if defined(__cplusplus)
extern "C" {
#endif


// Forward declarations

typedef uint8_t fuchsia_tracelink_BufferingMode;
#define fuchsia_tracelink_BufferingMode_ONESHOT UINT8_C(0)
#define fuchsia_tracelink_BufferingMode_CIRCULAR UINT8_C(1)
#define fuchsia_tracelink_BufferingMode_STREAMING UINT8_C(2)

#define fuchsia_tracelink_ProviderStartOrdinal ((uint32_t)1)
typedef struct fuchsia_tracelink_ProviderStartRequest fuchsia_tracelink_ProviderStartRequest;
#define fuchsia_tracelink_ProviderStopOrdinal ((uint32_t)2)
typedef struct fuchsia_tracelink_ProviderStopRequest fuchsia_tracelink_ProviderStopRequest;
#define fuchsia_tracelink_RegistryRegisterTraceProviderOrdinal ((uint32_t)1)
typedef struct fuchsia_tracelink_RegistryRegisterTraceProviderRequest fuchsia_tracelink_RegistryRegisterTraceProviderRequest;

// Extern declarations

extern const fidl_type_t fuchsia_tracelink_ProviderStartRequestTable;
extern const fidl_type_t fuchsia_tracelink_ProviderStopRequestTable;
extern const fidl_type_t fuchsia_tracelink_RegistryRegisterTraceProviderRequestTable;

// Declarations

struct fuchsia_tracelink_ProviderStartRequest {
    FIDL_ALIGNDECL
    fidl_message_header_t hdr;
    fuchsia_tracelink_BufferingMode buffering_mode;
    zx_handle_t buffer;
    zx_handle_t fifo;
    fidl_vector_t categories;
};

struct fuchsia_tracelink_ProviderStopRequest {
    FIDL_ALIGNDECL
    fidl_message_header_t hdr;
};

struct fuchsia_tracelink_RegistryRegisterTraceProviderRequest {
    FIDL_ALIGNDECL
    fidl_message_header_t hdr;
    fuchsia_tracelink_Provider provider;
};


// Simple clients 

#if defined(__cplusplus)
}
#endif
